﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.views.components.tutorial {
    import flash.events.*;
    import flash.display.*;
    import flash.text.*;
    import net.wooga.pets.constants.*;

    public class FirstPetComponent extends MovieClip {

        public var bear:MovieClip;

        public static const MARGIN:int = 20;
        public static const BUTTON_MARGIN:int = 20;
        public static const BUBBLE_WIDTH:int = 452;

        public function FirstPetComponent(){
            this.bear.active.buttonMode = true;
            this.bear.active.addEventListener(MouseEvent.CLICK, this.onClick);
        }
        public function setMessageText(_arg1:String, _arg2:TextFormat):void{
            this.bear.messageTxt.embedFonts = true;
            this.bear.messageTxt.htmlText = _arg1;
            this.bear.messageTxt.setTextFormat(_arg2);
        }
        public function setButtonText(_arg1:String, _arg2:TextFormat):void{
            this.bear.okBtn.buttonText.embedFonts = true;
            this.bear.okBtn.buttonText.htmlText = _arg1;
            this.bear.okBtn.buttonText.autoSize = TextFieldAutoSize.CENTER;
            this.bear.okBtn.buttonText.multiline = false;
            this.bear.okBtn.buttonText.setTextFormat(_arg2);
        }
        public function set isCured(_arg1:Boolean):void{
            var _local2:String = (_arg1) ? "cured" : "sick";
            this.bear.gotoAndPlay(_local2);
        }
        private function onClick(_arg1:MouseEvent):void{
            dispatchEvent(new Event(EventConstants.OK_BUTTON_CLICK));
        }

    }
}//package net.wooga.pets.views.components.tutorial 
